package com.tanhua.admin.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.Analysis;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


public interface AnalysisMapper extends BaseMapper<Analysis> {

    @Select("select sum(num_registered) from tb_analysis")
    Long queryUserCount(@Param("today") DateTime today, int offset, @Param("num_registered") String numRegistered);

    @Select("select sum(${column}) from tb_analysis where record_date > ${leDate} and record_date < ${gtDate}")
    Long sumAnalysisData(@Param("column") String column, @Param("leDate") String leDate, @Param("gtDate") String gtDate);

    @Select("select sum(num_registered) from tb_analysis")
    Integer queryCumulativeUsers();


}